arr = [
    [1,2,3,4],
    [5,6,7,8],
    [9,10,11,12],
    [13,14,15,16]
]

length = len(arr[0])-1
length_list = [length+i for i in range(length+1)]
while length_list[-1] >= 0:
    length = (length+1) % len(arr[0])
    if 0 <= length_list[length] <= 3:
        print(arr[length][length_list[length]], end=' ')
    length_list[length] -= 1